import request from '@/config/request'

/**
 * 新增用户
 */
export const createUser = (data: any) => {
  return request.post({ url: '/system/user/create', data })
}

/**
 * 修改用户
 */
export const updateUser = (data: any) => {
  return request.put({ url: '/system/user/update', data })
}

/**
 * 删除用户
 */
export const deleteUser = (params: any) => {
  return request.delete({ url: '/system/user/delete', params })
}

/**
 * 获取用户分页
 */
export const getUserPage = (params: any) => {
  return request.post({ url: '/system/user/page', data: params })
}

/**
 * 获取用户详情
 */
export const getUserDetail = (params: any) => {
  return request.get({ url: '/system/user/get', params })
}

/**
 * 修改用户状态
 */
export const updateUserStatus = (data: any) => {
  return request.put({ url: '/system/user/update-status', data })
}
